3.5.100 \(\int \frac {1}{(5+3 \tan (c+d x))^2} \, dx\) [500]

Optimal. Leaf size=50 \[ \frac {4 x}{289}+\frac {15 \log (5 \cos (c+d x)+3 \sin (c+d x))}{578 d}-\frac {3}{34 d (5+3 \tan (c+d x))} \]

[Out]

4/289*x+15/578*ln(5*cos(d*x+c)+3*sin(d*x+c))/d-3/34/d/(5+3*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3564, 3612, 3611} \begin {gather*} -\frac {3}{34 d (3 \tan (c+d x)+5)}+\frac {15 \log (3 \sin (c+d x)+5 \cos (c+d x))}{578 d}+\frac {4 x}{289} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(5 + 3*Tan[c + d*x])^(-2),x]

[Out]

(4*x)/289 + (15*Log[5*Cos[c + d*x] + 3*Sin[c + d*x]])/(578*d) - 3/(34*d*(5 + 3*Tan[c + d*x]))

Rule 3564

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((a + b*Tan[c + d*x])^(n + 1)/(d*(n + 1)*
(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a - b*Tan[c + d*x])*(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ
[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && LtQ[n, -1]

Rule 3611

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c/(b*f))
*Log[RemoveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rule 3612

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c +
b*d)*(x/(a^2 + b^2)), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rubi steps

\begin {align*} \int \frac {1}{(5+3 \tan (c+d x))^2} \, dx &=-\frac {3}{34 d (5+3 \tan (c+d x))}+\frac {1}{34} \int \frac {5-3 \tan (c+d x)}{5+3 \tan (c+d x)} \, dx\\ &=\frac {4 x}{289}-\frac {3}{34 d (5+3 \tan (c+d x))}+\frac {15}{578} \int \frac {3-5 \tan (c+d x)}{5+3 \tan (c+d x)} \, dx\\ &=\frac {4 x}{289}+\frac {15 \log (5 \cos (c+d x)+3 \sin (c+d x))}{578 d}-\frac {3}{34 d (5+3 \tan (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.28, size = 67, normalized size = 1.34 \begin {gather*} -\frac {(15+8 i) \log (i-\tan (c+d x))+(15-8 i) \log (i+\tan (c+d x))-30 \log (5+3 \tan (c+d x))+\frac {102}{5+3 \tan (c+d x)}}{1156 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(5 + 3*Tan[c + d*x])^(-2),x]

[Out]

-1/1156*((15 + 8*I)*Log[I - Tan[c + d*x]] + (15 - 8*I)*Log[I + Tan[c + d*x]] - 30*Log[5 + 3*Tan[c + d*x]] + 10
2/(5 + 3*Tan[c + d*x]))/d

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 55, normalized size = 1.10

method result size
derivativedivides \(\frac {-\frac {15 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{1156}+\frac {4 \arctan \left (\tan \left (d x +c \right )\right )}{289}-\frac {3}{34 \left (5+3 \tan \left (d x +c \right )\right )}+\frac {15 \ln \left (5+3 \tan \left (d x +c \right )\right )}{578}}{d}\) \(55\)
default \(\frac {-\frac {15 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{1156}+\frac {4 \arctan \left (\tan \left (d x +c \right )\right )}{289}-\frac {3}{34 \left (5+3 \tan \left (d x +c \right )\right )}+\frac {15 \ln \left (5+3 \tan \left (d x +c \right )\right )}{578}}{d}\) \(55\)
norman \(\frac {\frac {20 x}{289}+\frac {12 x \tan \left (d x +c \right )}{289}-\frac {3}{34 d}}{5+3 \tan \left (d x +c \right )}+\frac {15 \ln \left (5+3 \tan \left (d x +c \right )\right )}{578 d}-\frac {15 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{1156 d}\) \(65\)
risch \(\frac {4 x}{289}-\frac {15 i x}{578}-\frac {15 i c}{289 d}-\frac {135}{578 d \left (17 \,{\mathrm e}^{2 i \left (d x +c \right )}+8+15 i\right )}+\frac {36 i}{289 d \left (17 \,{\mathrm e}^{2 i \left (d x +c \right )}+8+15 i\right )}+\frac {15 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {8}{17}+\frac {15 i}{17}\right )}{578 d}\) \(80\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(5+3*tan(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-15/1156*ln(1+tan(d*x+c)^2)+4/289*arctan(tan(d*x+c))-3/34/(5+3*tan(d*x+c))+15/578*ln(5+3*tan(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 53, normalized size = 1.06 \begin {gather*} \frac {16 \, d x + 16 \, c - \frac {102}{3 \, \tan \left (d x + c\right ) + 5} - 15 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 30 \, \log \left (3 \, \tan \left (d x + c\right ) + 5\right )}{1156 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

1/1156*(16*d*x + 16*c - 102/(3*tan(d*x + c) + 5) - 15*log(tan(d*x + c)^2 + 1) + 30*log(3*tan(d*x + c) + 5))/d

________________________________________________________________________________________

Fricas [A]
time = 0.98, size = 83, normalized size = 1.66 \begin {gather*} \frac {80 \, d x + 15 \, {\left (3 \, \tan \left (d x + c\right ) + 5\right )} \log \left (\frac {9 \, \tan \left (d x + c\right )^{2} + 30 \, \tan \left (d x + c\right ) + 25}{\tan \left (d x + c\right )^{2} + 1}\right ) + 3 \, {\left (16 \, d x + 15\right )} \tan \left (d x + c\right ) - 27}{1156 \, {\left (3 \, d \tan \left (d x + c\right ) + 5 \, d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

1/1156*(80*d*x + 15*(3*tan(d*x + c) + 5)*log((9*tan(d*x + c)^2 + 30*tan(d*x + c) + 25)/(tan(d*x + c)^2 + 1)) +
 3*(16*d*x + 15)*tan(d*x + c) - 27)/(3*d*tan(d*x + c) + 5*d)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (42) = 84\).
time = 0.28, size = 190, normalized size = 3.80 \begin {gather*} \begin {cases} \frac {48 d x \tan {\left (c + d x \right )}}{3468 d \tan {\left (c + d x \right )} + 5780 d} + \frac {80 d x}{3468 d \tan {\left (c + d x \right )} + 5780 d} + \frac {90 \log {\left (3 \tan {\left (c + d x \right )} + 5 \right )} \tan {\left (c + d x \right )}}{3468 d \tan {\left (c + d x \right )} + 5780 d} + \frac {150 \log {\left (3 \tan {\left (c + d x \right )} + 5 \right )}}{3468 d \tan {\left (c + d x \right )} + 5780 d} - \frac {45 \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )} \tan {\left (c + d x \right )}}{3468 d \tan {\left (c + d x \right )} + 5780 d} - \frac {75 \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{3468 d \tan {\left (c + d x \right )} + 5780 d} - \frac {102}{3468 d \tan {\left (c + d x \right )} + 5780 d} & \text {for}\: d \neq 0 \\\frac {x}{\left (3 \tan {\left (c \right )} + 5\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*tan(d*x+c))**2,x)

[Out]

Piecewise((48*d*x*tan(c + d*x)/(3468*d*tan(c + d*x) + 5780*d) + 80*d*x/(3468*d*tan(c + d*x) + 5780*d) + 90*log
(3*tan(c + d*x) + 5)*tan(c + d*x)/(3468*d*tan(c + d*x) + 5780*d) + 150*log(3*tan(c + d*x) + 5)/(3468*d*tan(c +
 d*x) + 5780*d) - 45*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/(3468*d*tan(c + d*x) + 5780*d) - 75*log(tan(c + d*x
)**2 + 1)/(3468*d*tan(c + d*x) + 5780*d) - 102/(3468*d*tan(c + d*x) + 5780*d), Ne(d, 0)), (x/(3*tan(c) + 5)**2
, True))

________________________________________________________________________________________

Giac [A]
time = 0.55, size = 64, normalized size = 1.28 \begin {gather*} \frac {16 \, d x + 16 \, c - \frac {18 \, {\left (5 \, \tan \left (d x + c\right ) + 14\right )}}{3 \, \tan \left (d x + c\right ) + 5} - 15 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 30 \, \log \left ({\left | 3 \, \tan \left (d x + c\right ) + 5 \right |}\right )}{1156 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*tan(d*x+c))^2,x, algorithm="giac")

[Out]

1/1156*(16*d*x + 16*c - 18*(5*tan(d*x + c) + 14)/(3*tan(d*x + c) + 5) - 15*log(tan(d*x + c)^2 + 1) + 30*log(ab
s(3*tan(d*x + c) + 5)))/d

________________________________________________________________________________________

Mupad [B]
time = 4.08, size = 64, normalized size = 1.28 \begin {gather*} \frac {15\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+\frac {5}{3}\right )}{578\,d}-\frac {1}{34\,d\,\left (\mathrm {tan}\left (c+d\,x\right )+\frac {5}{3}\right )}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (-\frac {15}{1156}-\frac {2}{289}{}\mathrm {i}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (-\frac {15}{1156}+\frac {2}{289}{}\mathrm {i}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3*tan(c + d*x) + 5)^2,x)

[Out]

(15*log(tan(c + d*x) + 5/3))/(578*d) - (log(tan(c + d*x) - 1i)*(15/1156 + 2i/289))/d - (log(tan(c + d*x) + 1i)
*(15/1156 - 2i/289))/d - 1/(34*d*(tan(c + d*x) + 5/3))

________________________________________________________________________________________